home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / OCI72 / OCIDEM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-18  |  3.6 KB  |  109 lines

  1. /*
  2.  * $Header: ocidem.h 7020100.1 94/09/23 22:19:29 cli Generic<base> $ 
  3.  */
  4.  
  5. /* Copyright (c) 1991 by Oracle Corporation */
  6. /*
  7.    NAME
  8.      ocidem.h - OCI demo header
  9.    MODIFIED   (MM/DD/YY)
  10.     emendez    04/07/94 -  merge changes from branch 1.6.710.1
  11.     emendez    02/02/94 -  Fix for bug 157576
  12.     jnlee      01/05/93 -  include oratypes.h once, make oci_func_tab static
  13.     rkooi2     10/26/92 -  More portability mods 
  14.     rkooi2     10/22/92 -  Change text back to char to avoid casts 
  15.     rkooi2     10/20/92 -  Changes to make it portable 
  16.     sjain      03/16/92 -  Creation 
  17. */
  18.  
  19. /*
  20.  *  ocidem.h
  21.  *
  22.  *  Declares additional functions and data structures
  23.  *  used in the OCI C sample programs.
  24.  */
  25.  
  26. #ifndef ORATYPES
  27. #include <oratypes.h>
  28. #endif /* ORATYPES */
  29.  
  30. #ifndef OCIDEM
  31. #define OCIDEM
  32.  
  33.  
  34. /*  internal/external datatype codes */
  35. #define VARCHAR2_TYPE            1
  36. #define NUMBER_TYPE              2
  37. #define INT_TYPE         3
  38. #define FLOAT_TYPE               4
  39. #define STRING_TYPE              5
  40. #define ROWID_TYPE              11
  41. #define DATE_TYPE               12
  42.  
  43. /*  ORACLE error codes used in demonstration programs */
  44. #define VAR_NOT_IN_LIST       1007
  45. #define NO_DATA_FOUND         1403
  46. #define NULL_VALUE_RETURNED   1405
  47.  
  48. /*  some SQL and OCI function codes */
  49. #define FT_INSERT                3
  50. #define FT_SELECT                4
  51. #define FT_UPDATE                5
  52. #define FT_DELETE                9
  53.  
  54. #define FC_OOPEN                14
  55.  
  56. /*
  57. ** Size of HDA area:
  58. ** 512 for 64 bit arquitectures
  59. ** 256 for 32 bit arquitectures
  60. */
  61.  
  62. #if (defined(__osf__) && defined(__alpha)) || defined(CRAY) || defined(KSR)
  63. # define HDA_SIZE 512
  64. #else
  65. # define HDA_SIZE 256
  66. #endif
  67.  
  68. /*
  69.  *  OCI function code labels,
  70.  *  corresponding to the fc numbers
  71.  *  in the cursor data area.
  72.  */
  73. static CONST text  *oci_func_tab[] =  {(text *) "not used",
  74. /* 1-2 */       (text *) "not used", (text *) "OSQL",
  75. /* 3-4 */       (text *) "not used", (text *) "OEXEC, OEXN",
  76. /* 5-6 */       (text *) "not used", (text *) "OBIND",
  77. /* 7-8 */       (text *) "not used", (text *) "ODEFIN",
  78. /* 9-10 */      (text *) "not used", (text *) "ODSRBN",
  79. /* 11-12 */     (text *) "not used", (text *) "OFETCH, OFEN",
  80. /* 13-14 */     (text *) "not used", (text *) "OOPEN",
  81. /* 15-16 */     (text *) "not used", (text *) "OCLOSE",
  82. /* 17-18 */     (text *) "not used", (text *) "not used",
  83. /* 19-20 */     (text *) "not used", (text *) "not used",
  84. /* 21-22 */     (text *) "not used", (text *) "ODSC",
  85. /* 23-24 */     (text *) "not used", (text *) "ONAME",
  86. /* 25-26 */     (text *) "not used", (text *) "OSQL3",
  87. /* 27-28 */     (text *) "not used", (text *) "OBNDRV",
  88. /* 29-30 */     (text *) "not used", (text *) "OBNDRN",
  89. /* 31-32 */     (text *) "not used", (text *) "not used",
  90. /* 33-34 */     (text *) "not used", (text *) "OOPT",
  91. /* 35-36 */     (text *) "not used", (text *) "not used",
  92. /* 37-38 */     (text *) "not used", (text *) "not used",
  93. /* 39-40 */     (text *) "not used", (text *) "not used",
  94. /* 41-42 */     (text *) "not used", (text *) "not used",
  95. /* 43-44 */     (text *) "not used", (text *) "not used",
  96. /* 45-46 */     (text *) "not used", (text *) "not used",
  97. /* 47-48 */     (text *) "not used", (text *) "not used",
  98. /* 49-50 */     (text *) "not used", (text *) "not used",
  99. /* 51-52 */     (text *) "not used", (text *) "OCAN",
  100. /* 53-54 */     (text *) "not used", (text *) "OPARSE",
  101. /* 55-56 */     (text *) "not used", (text *) "OEXFET",
  102. /* 57-58 */     (text *) "not used", (text *) "OFLNG",
  103. /* 59-60 */     (text *) "not used", (text *) "ODESCR",
  104. /* 61-62 */     (text *) "not used", (text *) "OBNDRA"
  105. };
  106.  
  107. #endif      /* OCIDEM */
  108.  
  109.